<template>
  <div class="box-wrapper">
    <div class="title">
      <span>{{ attr.isNull ? '*' : '' }}</span>{{ attr.name }}<span v-if="attr.inputTips">{{ '（'+attr.inputTips+'）' }}</span>
    </div>
    <div class="box">
      <span class="default-val">{{ typeof attr.defaultValue == 'string' ? attr.defaultValue : '默认文字' }}</span>
    </div>
    <span
      v-if="isShow"
      class="el-icon-delete control"
      @click="handleDelete"/>
  </div>
</template>

<script>
/**
   * 单行文本
   */
import mixins from './mixin'

export default {
  name: 'ShowText',
  mixins: [mixins]
}
</script>

<style scoped lang="scss">
  @import 'form.scss';

  .box {
    width: 310px;
    height: 32px;
    padding: 0 10px;
    font-size: 14px;
    .default-val {
      color: #333;
    }
  }
</style>
